package com.fausto.learnimprint.core.service

import com.baomidou.mybatisplus.extension.service.IService
import com.fausto.learnimprint.core.model.dto.UserLogin
import com.fausto.learnimprint.core.model.entity.User

/**
 *
 *
 * 服务类
 *
 *
 * @author fausto
 * @since 2022-03-28
 */
interface IUserService : IService<User> {

    fun login(user: UserLogin): Map<String, Any>

    fun logout()

    fun findUserFromContext(): User

    fun findUserFromDatabase(): User

    fun getRoles(user: User): List<String>

    fun findUserMail(): String

   // fun updateUserMail(newMail: String, oldMailCode: String, newMailCode: String): Boolean
}